import Mock from 'mockjs';
const Random = Mock.Random;

//利用mock生成数据
export const trafficHubVolume = ()=>{
    let data =  Mock.mock(
                {
                    result:[{
                        'passengerStationCount':Random.integer( 1, 1000 ),
                        'busTerminalCount':Random.integer( 1, 1000 ),
                        'railwayStationCount':Random.integer( 1, 1000 ),
                        'airPortCount':Random.integer( 1, 1000 ),
                        'freightStationCount':Random.integer( 1, 1000 ),
                        'airportOutEnterCount':Random.integer( 1, 1000 ),
                        'railwayPassangerCount':Random.integer( 1, 1000 ),
                        'busPassangerCount':Random.integer( 1, 1000 ),
                    }]

                }
        );
    return data
};
export const roadTransportation = ()=>{
    let data =  Mock.mock(
            {
                result:[{
                    'passengerTotal':Random.integer( 1, 1000 ),
                    'dayPassenger':Random.integer( 1, 1000 ),
                    'orgCount':Random.integer( 1, 1000 ),
                    'freightCount':Random.integer( 1, 1000 ),
                    'passengerLine':Random.integer( 1, 1000 ),
                    'freightSum':Random.integer( 1, 1000 ),
                    'freightEnterprisesCount':Random.integer( 1, 1000 ),
                    'dangerFreightEnterprisesCount':Random.integer( 1, 1000 ),
                    'freightCapacity':Random.integer( 1, 1000 ),
                    'dangerFreightCapacity':Random.integer( 1, 1000 ),
                }]

            }
    );
    return data
};
export const trafficNetwork1 = ()=>{
    let data =  Mock.mock(
            {
                result:[
                    {
                        'nationalRoadMileageSum':Random.integer( 1, 1000 ),
                        'provinceRoadMileageSum':Random.integer( 1, 1000 ),
                        'countyRoadMileageSum':Random.integer( 1, 1000 ),
                        'villageRoadMileageSum':Random.integer( 1, 1000 ),
                    }
                ]

            }
    );
    return data
};
export const trafficNetwork2 = ()=>{
    let data =  Mock.mock(
            {
                result:[
                    {
                        'roadMileageTotalSum':Random.integer( 1, 1000 ),
                        'busSpecialCount':Random.integer( 1, 1000 ),
                        'highRoadMileageSum':Random.integer( 1, 1000 ),
                        'bridgeCount':Random.integer( 1, 1000 ),
                        'tunnelCount':Random.integer( 1, 1000 ),
                    }
                ]

            }
    );
    return data
};
export const transportInfrastructure = ()=>{
    let data =  Mock.mock(
            {
                result:[
                    {
                        'rate':Random.integer( 1, 100 ),
                        'busVehicleCount':Random.integer( 1, 1000 ),
                        'underCount':Random.integer( 1, 1000 ),
                        'taxiCount':Random.integer( 1, 1000 ),
                    }
                ]

            }
    );
    return data
};

export const yearDayPassengerVolume = ()=>{
    let data =  Mock.mock(
            {
                result:[
                    {
                        'year':[Random.integer( 1, 1000 ),Random.integer( 1, 1000 ),Random.integer( 1, 1000 )],//["地铁", "公交", "出租车"];
                        'day':[Random.integer( 1, 100 ),Random.integer( 1, 100 ),Random.integer( 1, 100 )],//["地铁", "公交", "出租车"];
                    }
                ]


            }
    );
    return data
};
export const dailyTrafficMonitoring = ()=>{
    let data =  Mock.mock(
            {
                result:[
                    {
                        type:1,
                        congestionIndex:Random.integer( 1, 100 ),
                        speed: Random.integer( 1, 100 ) ,
                    },
                    {
                        type:2,
                        congestionIndex:Random.integer( 1, 100 ),
                        speed: Random.integer( 1, 100 ) ,
                    },
                    {
                        type:3,
                        congestionIndex:Random.integer( 1, 100 ),
                        speed: Random.integer( 1, 100 ) ,
                    }
                ]

            }
    );
    return data
};
export const weatherDonitoring = ()=>{
    let data =  Mock.mock(
            {
                result:[
                    {
                        temperature:Random.integer( 1, 100 ),
                        relativeHumidity: Random.integer( 1, 100 ) ,
                        avgWindSpeed: Random.integer( 1, 100 ) ,
                        dailyPrecipitation: Random.integer( 1, 100 ) ,
                    }
                ]
            }
    );
    return data
};
export const winningStatistics = ()=>{
    let data =  Mock.mock(
            {
                result:[
                    {
                        select_avg_price:Random.integer( 1, 100 ),
                        select_rate: `1:${Random.integer( 1, 1000 )}` ,
                    }
                ]
            }
    );
    return data
};
